<?php
$file_name = "../ptnhuan-web1/data/films.txt";
$file_path = realpath($file_name);
$film= array();
$file = fopen ($file_path, "r");
while (!feof($file)){
    $film[]=trim(fgets($file));
}
fclose($file);
?>
<?php foreach ($film as $line): ?>
<?php if(!empty($line)): ?>
<?php $films = explode(";", $line);?>
<img src ='../ptnhuan-web1/public/images/films/<?php echo $films[1]; ?>'><br>
<?php echo $films[2]; ?><br>
<?php echo $films[3]; ?><br>

<?php endif; ?>    
<?php endforeach; ?>

 


